const path = require('path')

module.exports = {
    devServer: {
        host: '0.0.0.0'
    },
    chainWebpack: (config) => {
        config.resolve.alias
            .set('~', path.join(__dirname, ''))
    },
    css: {
        loaderOptions: {
            postcss: {
                plugins: [
                    require('postcss-px-to-viewport')({
                        unitToConvert: 'px',
                        viewportWidth: 750,
                        unitPrecision: 3,
                        propList: [
                            '*'
                        ],
                        viewportUnit: 'vw',
                        fontViewportUnit: 'vw',
                        selectorBlackList: ['.ignore'],
                        minPixelValue: 1,
                        mediaQuery: false,
                        replace: true,
                        exclude: /(\/|\\)(node_modules)(\/|\\)/
                    })
                ]
            }
        }
    }
}